home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt32s1.arc / EXECUTEC.PAS < prev    next >
Pascal/Delphi Source File  |  1985-11-10  |  25KB  |  628 lines

  1. (*----------------------------------------------------------------------*)
  2. (*           Execute_Command --- Execute PibTerm  command               *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Execute_Command;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  Execute_Command                                      *)
  10. (*                                                                      *)
  11. (*     Purpose:    Execute PibTerm Commands                             *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Execute_Command( VAR Command    : Pibterm_Command_Type;       *)
  16. (*                         VAR Done       : BOOLEAN;                    *)
  17. (*                             Use_Script : BOOLEAN );                  *)
  18. (*                                                                      *)
  19. (*           Command    --- Command to execute                          *)
  20. (*           Done       --- set TRUE if termination command found       *)
  21. (*           Use_Script --- TRUE if this is a script command execution  *)
  22. (*                                                                      *)
  23. (*      Calls:   Async_Send_String                                      *)
  24. (*               PibDialer                                              *)
  25. (*               Async_Send_Break                                       *)
  26. (*               Async_Carrier_Detect                                   *)
  27. (*               Display_Commands                                       *)
  28. (*               Delay                                                  *)
  29. (*               GetAreaCode                                            *)
  30. (*               PibUpLoad                                              *)
  31. (*               PibDownLoad                                            *)
  32. (*               Save_Screen                                            *)
  33. (*               Restore_Screen                                         *)
  34. (*               Draw_Menu_Frame                                        *)
  35. (*               Fast_Change_Params                                     *)
  36. (*               PibFileManipulation                                    *)
  37. (*               Get_Capture_File                                       *)
  38. (*               Toggle_Option                                          *)
  39. (*               HangUpPhone                                            *)
  40. (*               Send_Function_Key                                      *)
  41. (*               Set_Input_Keys                                         *)
  42. (*               Set_Translate_Table                                    *)
  43. (*               Do_Screen_Dump                                         *)
  44. (*               DosJump                                                *)
  45. (*                                                                      *)
  46. (*----------------------------------------------------------------------*)
  47.  
  48. VAR
  49.    Flag       : BOOLEAN;
  50.    I          : INTEGER;
  51.    J          : INTEGER;
  52.    T_Type     : Terminal_Type;
  53.    TimeW      : STRING[8];
  54.    TimeN      : STRING[8];
  55.    TimeO      : STRING[8];
  56.    Local_Save : Saved_Screen_Ptr;
  57.    ESC_Found  : BOOLEAN;
  58.    Trans_Type : Transfer_Type;
  59.    Ch         : CHAR;
  60.    Rem_Ch     : CHAR;
  61.    XPos       : INTEGER;
  62.    GotChar    : BOOLEAN;
  63.    S          : AnyStr;
  64.    Echo       : BOOLEAN;
  65.    Test_Cond  : BOOLEAN;
  66.  
  67. (*----------------------------------------------------------------------*)
  68. (*           Remote_Input --- get remote input in response to prompt    *)
  69. (*----------------------------------------------------------------------*)
  70.  
  71. PROCEDURE Remote_Input;
  72.  
  73. (*----------------------------------------------------------------------*)
  74. (*                                                                      *)
  75. (*     Procedure:  Remote_Input                                         *)
  76. (*                                                                      *)
  77. (*     Purpose:    Gets remote input (from host system) in response to  *)
  78. (*                 prompt.                                              *)
  79. (*                                                                      *)
  80. (*     Calling Sequence:                                                *)
  81. (*                                                                      *)
  82. (*        Remote_Input;                                                 *)
  83. (*                                                                      *)
  84. (*           Global string  -Script_Remote_Reply- get the resultant     *)
  85. (*           input.                                                     *)
  86. (*                                                                      *)
  87. (*      Calls:   Async_Send                                             *)
  88. (*               Send_Function_Key                                      *)
  89. (*               Async_Receive                                          *)
  90. (*                                                                      *)
  91. (*----------------------------------------------------------------------*)
  92.  
  93. VAR
  94.    Rem_Ch     : CHAR;
  95.    XPos       : INTEGER;
  96.    GotChar    : BOOLEAN;
  97.    S          : AnyStr;
  98.    Echo       : BOOLEAN;
  99.    Ch         : CHAR;
  100.  
  101. BEGIN (* Remote_Input *)
  102.                                    (* Send prompt to remote system *)
  103.  
  104.    IF LENGTH( Script_String ) > 0 THEN
  105.       Send_Function_Key( Script_String );
  106.  
  107.    Ch                  := CHR( 0 );
  108.    Script_Remote_Reply := '';
  109.    XPos                := WhereX;
  110.    Echo                := ( Script_Integer_1 > 0 );
  111.  
  112.                                    (* Get response string        *)
  113.    REPEAT
  114.  
  115.       GotChar := FALSE;
  116.                                    (* Check for keyboard input   *)
  117.       IF KeyPressed THEN
  118.          BEGIN
  119.             READ( Kbd, Ch );
  120.             GotChar := TRUE;
  121.          END;
  122.                                    (* Check for remote input *)
  123.  
  124.       IF Async_Receive( Rem_Ch ) THEN
  125.          BEGIN
  126.             Ch      := Rem_Ch;
  127.             GotChar := TRUE;
  128.          END;
  129.                                    (* Process received character *)
  130.       IF GotChar THEN
  131.          IF Ch <> CHR( CR ) THEN
  132.             IF Ch = ^H THEN
  133.                BEGIN  (* Backspace *)
  134.                   IF WhereX > Xpos THEN
  135.                      BEGIN
  136.                         Async_Send( Ch  );
  137.                         WRITE( Ch );
  138.                         Async_Send( ' ' );
  139.                         WRITE( ' ' );
  140.                         Async_Send( Ch  );
  141.                         WRITE( Ch );
  142.                         IF ( LENGTH( Script_Remote_Reply ) > 1 ) THEN
  143.                            Script_Remote_Reply := COPY( Script_Remote_Reply,
  144.                                                   1,
  145.                                                   LENGTH( Script_Remote_Reply ) - 1 )
  146.                         ELSE
  147.                            Script_Remote_Reply := '';
  148.                      END;
  149.                END   (* Backspace *)
  150.             ELSE
  151.                BEGIN
  152.                   Script_Remote_Reply := Script_Remote_Reply + Ch;
  153.                   IF Echo THEN
  154.                      BEGIN
  155.                         Async_Send( Ch );
  156.                         WRITE( Ch );
  157.                      END
  158.                   ELSE
  159.                      BEGIN
  160.                         Async_Send( '.' );
  161.                         WRITE( '.' );
  162.                      END
  163.                END;
  164.  
  165.    UNTIL ( Ch = CHR( CR ) ) OR ( NOT Async_Carrier_Detect );
  166.  
  167.    Script_Remote_Reply_Ok := FALSE;
  168.  
  169. END   (* Remote_Input *);
  170.  
  171. (*----------------------------------------------------------------------*)
  172.  
  173. BEGIN (* Execute_Command *)
  174.                                    (* Don't get confused by previous *)
  175.                                    (* script strings if manual entry *)
  176.    IF ( NOT Use_Script ) THEN
  177.       BEGIN
  178.          Script_String    := '';
  179.          Script_String_2  := '';
  180.          Script_Integer_1 := 0;
  181.       END;
  182.                                    (* Execute chosen command *)
  183.    CASE Command Of
  184.  
  185.       Null_Command,
  186.       Bad_Command :  ;
  187.  
  188.       AddLFSy     :  Toggle_Option( 'Add line feeds', Add_LF );
  189.  
  190.       AreaCodeSy  :  GetAreaCode;
  191.  
  192.       BreakSy     :  Async_Send_Break;
  193.  
  194.       CaptureSy   :  Get_Capture_File( Script_String , Script_String_2 );
  195.  
  196.       ClearSy     :  ClrScr;
  197.  
  198.       DelaySy     :  DELAY( Delay_Time );
  199.  
  200.       DialSy      :  BEGIN
  201.                         PibDialer( FALSE , Script_String );
  202.                         Script_String := '';
  203.                      END;
  204.  
  205.       DosSy       :  BEGIN
  206.                         DosJump( Script_String );
  207.                         Script_String := '';
  208.                      END;
  209.  
  210.       EchoSy      :  Toggle_Option( 'Local Echo', Local_Echo );
  211.  
  212.       EditSy      :  Edit_A_Line;
  213.  
  214.       ExitSy      :  IF Script_File_Mode THEN
  215.                         BEGIN
  216.                            Toggle_Option( 'Script Mode', Script_File_Mode );
  217.                            IF Script_Buffer_Size > 0 THEN
  218.                               FREEMEM( Script_Buffer , Script_Buffer_Size );
  219.                            Script_Buffer      := NIL;
  220.                            Script_Buffer_Size := 0;
  221.                         END;
  222.  
  223.       FastCSy     :  Fast_Change_Params;
  224.  
  225.       FileSy      :  PibFileManipulation;
  226.  
  227.       GossipSy    :  BEGIN
  228.                         Toggle_Option( 'Gossip mode', Gossip_Mode_On );
  229.                         Done := TRUE;
  230.                         IF Gossip_Mode_On THEN
  231.                            BEGIN
  232.                               Saved_Gossip_Term   := Terminal_To_Emulate;
  233.                               Terminal_To_Emulate := Gossip;
  234.                            END
  235.                         ELSE
  236.                            BEGIN
  237.                               Terminal_To_Emulate := Saved_Gossip_Term;
  238.                            END;
  239.                      END;
  240.  
  241.       GoToSy      :  Script_Buffer_Pos := Script_Integer_1 - 1;
  242.  
  243.       HangUpSy    :  BEGIN (* Hang-up Phone *)
  244.  
  245.                         Save_Screen( Saved_Screen );
  246.  
  247.                         Draw_Menu_Frame( 10, 10, 60, 15, Menu_Frame_Color,
  248.                                          Menu_Text_Color, '' );
  249.  
  250.                         WRITELN;
  251.                         WRITELN('*** Hanging up the phone ***');
  252.  
  253.                                    (* Hang up the phone *)
  254.  
  255.                         HangUpPhone;
  256.  
  257.                         IF Async_Carrier_Detect THEN
  258.                            WRITELN('*** Phone not hung up, try again ***')
  259.                         ELSE
  260.                            BEGIN
  261.                               WRITELN('*** Phone hung up ***');
  262.                               Flag := Async_Open( Comm_Port, Baud_Rate,
  263.                                                   Parity, Data_Bits,
  264.                                                   Stop_Bits );
  265.                            END;
  266.  
  267.                         DELAY( Two_Second_Delay );
  268.  
  269.                         Restore_Screen( Saved_Screen );
  270.  
  271.                         Reset_Global_Colors;
  272.  
  273.                      END   (* Hang-up Phone *);
  274.  
  275.       HostSy      :  BEGIN (* Set host mode *)
  276.                         Done                := TRUE;
  277.                         Saved_Gossip_Term   := Terminal_To_Emulate;
  278.                         Terminal_To_Emulate := HostMode;
  279.                      END   (* Set host mode *);
  280.  
  281.       IfConSy     :  IF ( Script_Integer_1 = 1 ) THEN
  282.                         IF Async_Carrier_Detect THEN
  283.                            Script_Buffer_Pos := Script_Integer_2 - 1
  284.                         ELSE
  285.                            Script_Buffer_Pos := Script_Integer_3 - 1
  286.                      ELSE
  287.                         IF ( NOT Async_Carrier_Detect ) THEN
  288.                            Script_Buffer_Pos := Script_Integer_2 - 1
  289.                         ELSE
  290.                            Script_Buffer_Pos := Script_Integer_3 - 1;
  291.  
  292.       IfFoundSy   :  IF ( Script_Integer_1 = 1 ) THEN
  293.                         IF Script_Wait_Found THEN
  294.                            Script_Buffer_Pos := Script_Integer_2 - 1
  295.                         ELSE
  296.                            Script_Buffer_Pos := Script_Integer_3 - 1
  297.                      ELSE
  298.                         IF ( NOT Script_Wait_Found ) THEN
  299.                            Script_Buffer_Pos := Script_Integer_2 - 1
  300.                         ELSE
  301.                            Script_Buffer_Pos := Script_Integer_3 - 1;
  302.  
  303.       IfLocStrSy  :  BEGIN
  304.  
  305.                         IF ( LENGTH( Script_Reply  ) > 0 ) AND
  306.                            ( LENGTH( Script_String ) > 0 ) THEN
  307.                            Script_Reply_Found :=
  308.                               ( POS( Script_Reply , Script_String ) > 0 );
  309.  
  310.                         Test_Cond := Script_Reply_Found;
  311.  
  312.                         IF ( Script_Integer_1 <> 1 ) THEN
  313.                            Test_Cond := NOT Test_Cond;
  314.  
  315.                         IF Test_Cond THEN
  316.                            Script_Buffer_Pos := Script_Integer_2 - 1
  317.                         ELSE
  318.                            Script_Buffer_Pos := Script_Integer_3 - 1;
  319.  
  320.                      END;
  321.  
  322.       IfRemStrSy  :  BEGIN
  323.  
  324.                         IF ( LENGTH( Script_Remote_Reply ) > 0 ) AND
  325.                            ( LENGTH( Script_String       ) > 0 ) THEN
  326.                            Script_Remote_Reply_OK :=
  327.                               ( POS( Script_Remote_Reply , Script_String ) > 0 );
  328.  
  329.                         Test_Cond := Script_Remote_Reply_OK;
  330.  
  331.                         IF ( Script_Integer_1 <> 1 ) THEN
  332.                            Test_Cond := NOT Test_Cond;
  333.  
  334.                         IF Test_Cond THEN
  335.                            Script_Buffer_Pos := Script_Integer_2 - 1
  336.                         ELSE
  337.                            Script_Buffer_Pos := Script_Integer_3 - 1;
  338.  
  339.                      END;
  340.  
  341.       InputSy     :  BEGIN
  342.                         WRITE( Script_String );
  343.                         READLN( Script_Reply );
  344.                         Script_Reply_Found := FALSE;
  345.                      END;
  346.  
  347.       InfoSy      :  Display_Help( FALSE );
  348.  
  349.       KeyDefSy    :  BEGIN
  350.  
  351.                         IF Key_No IN [F1..F10] THEN
  352.                            Function_Keys[ 1, Key_No - 58 ] :=
  353.                               Read_Ctrls( Script_String )
  354.  
  355.                         ELSE IF Key_No IN [Shift_F1..Shift_F10] THEN
  356.                            Function_Keys[ 2, Key_No - 83 ] :=
  357.                               Read_Ctrls( Script_String )
  358.  
  359.                         ELSE IF Key_No IN [Ctrl_F1..Ctrl_F10] THEN
  360.                            Function_Keys[ 3, Key_No - 93 ] :=
  361.                               Read_Ctrls( Script_String )
  362.  
  363.                         ELSE IF Key_No IN [Alt_F1..Alt_F10] THEN
  364.                            Function_Keys[ 4, Key_No - 103 ] :=
  365.                               Read_Ctrls( Script_String )
  366.  
  367.                        ELSE IF ( Keypad_Key_Index[ Key_No ] > 0 ) THEN
  368.                           BEGIN
  369.                              J := Keypad_Key_Index[ Key_No ];
  370.                              I := ( J - 1 ) DIV 10 + 1;
  371.                              J := J - ( I - 1 ) * 10;
  372.                              Keypad_Keys[ I , J ] := Read_Ctrls( Script_String );
  373.                           END;
  374.  
  375.                      END;
  376.  
  377.       KeySendSy   :  BEGIN
  378.  
  379.                         IF Key_No IN [F1..F10] THEN
  380.                            Send_Function_Key( Function_Keys[ 1, Key_No - 58 ] )
  381.  
  382.                         ELSE IF Key_No IN [Shift_F1..Shift_F10] THEN
  383.                            Send_Function_Key( Function_Keys[ 2, Key_No - 83 ] )
  384.  
  385.                         ELSE IF Key_No IN [Ctrl_F1..Ctrl_F10] THEN
  386.                            Send_Function_Key( Function_Keys[ 3, Key_No - 93 ] )
  387.  
  388.                         ELSE IF Key_No IN [Alt_F1..Alt_F10] THEN
  389.                            Send_Function_Key( Function_Keys[ 4, Key_No - 103 ] )
  390.  
  391.                         ELSE IF ( Keypad_Key_Index[ Key_No ] > 0 ) THEN
  392.                            BEGIN
  393.                               J := Keypad_Key_Index[ Key_No ];
  394.                               I := ( J - 1 ) DIV 10 + 1;
  395.                               J := J - ( I - 1 ) * 10;
  396.                               IF LENGTH( Keypad_Keys[ I , J ] ) > 0 THEN
  397.                                  Send_Function_Key( Keypad_Keys[ I , J ] );
  398.                            END;
  399.  
  400.                      END;
  401.  
  402.       KeySy       :  Set_Input_Keys( Script_String );
  403.  
  404.       LogSy       :  Toggle_Option('List session on printer', Printer_On );
  405.  
  406.       MessageSy   :  WRITELN( Script_String );
  407.  
  408.       MuteSy      :  BEGIN
  409.                         Toggle_Option('Silent Mode', Silent_Mode );
  410.                         Play_Music_On := NOT Silent_Mode;
  411.                         Menu_Set_Beep( NOT Silent_Mode );
  412.                      END;
  413.  
  414.       ParamSy     :  BEGIN
  415.                         T_Type := Terminal_To_Emulate;
  416.                         Flag   := Set_Params( FALSE , Use_Script );
  417.                         Done   := ( Terminal_To_Emulate <> T_Type );
  418.                         IF Read_In_Script THEN
  419.                            BEGIN
  420.                               Read_In_Script   := FALSE;
  421.                               Script_File_Name := '';
  422.                               Process_Script;
  423.                            END;
  424.                      END;
  425.  
  426.       QuitSy      :  BEGIN (* Quit *)
  427.  
  428.                         Save_Screen( Saved_Screen );
  429.  
  430.                         Draw_Menu_Frame( 10, 10, 51, 13, Menu_Frame_Color,
  431.                                          Menu_Text_Color, '' );
  432.  
  433.                         IF Script_File_Mode THEN
  434.                            BEGIN
  435.                               Script_File_Mode :=
  436.                                  NOT YesNo('Stop running current script (Y/N) ? ');
  437.                               IF ( NOT Script_File_Mode ) THEN
  438.                                  BEGIN
  439.                                     IF Script_Buffer_Size > 0 THEN
  440.                                        FREEMEM( Script_Buffer , Script_Buffer_Size );
  441.                                     Script_Buffer      := NIL;
  442.                                     Script_Buffer_Size := 0;
  443.                                  END;
  444.                            END
  445.                         ELSE IF When_Mode THEN
  446.                            BEGIN
  447.                               When_Mode :=
  448.                                  NOT YesNo('Stop WHEN string processing (Y/N) ? ');
  449.                               IF ( NOT When_Mode ) THEN
  450.                                  BEGIN
  451.                                     Script_When_Text       := '';
  452.                                     Script_When_Reply_Text := '';
  453.                                  END;
  454.                            END
  455.                         ELSE
  456.                            Done := YesNo('Are you sure you want to quit (Y/N) ? ');
  457.  
  458.                         Restore_Screen( Saved_Screen );
  459.  
  460.                         Reset_Global_Colors;
  461.  
  462.                         PibTerm_Done := Done;
  463.  
  464.                      END;
  465.  
  466.       RedialSy    :  BEGIN
  467.                         PibDialer( TRUE , Script_String );
  468.                         Script_String := '';
  469.                      END;
  470.  
  471.       ReceiveSy   :  BEGIN
  472.  
  473.                         IF LENGTH( Script_String ) > 0 THEN
  474.                            BEGIN
  475.                               FileName   := Script_String;
  476.                               Trans_Type := Transfers[ Script_Integer_1 ];
  477.                            END
  478.                         ELSE
  479.                            Trans_Type := None;
  480.  
  481.                         PibDownLoad( Trans_Type );
  482.  
  483.                      END;
  484.  
  485.       ResetSy     :  Script_Buffer_Pos := 0;
  486.  
  487.       RInputSy    :  Remote_Input;
  488.  
  489.       SDumpSy     :  Do_Screen_Dump;
  490.  
  491.       SendSy      :  BEGIN
  492.  
  493.                         IF LENGTH( Script_String ) > 0 THEN
  494.                            BEGIN
  495.                               FileName   := Script_String;
  496.                               Trans_Type := Transfers[ Script_Integer_1 ];
  497.                            END
  498.                         ELSE
  499.                            Trans_Type := None;
  500.  
  501.                         PibUpLoad( Trans_Type );
  502.  
  503.                      END;
  504.  
  505.       STextSy     :  BEGIN
  506.                         Send_Function_Key( Read_Ctrls( Script_String ) );
  507.                         Script_String := '';
  508.                      END;
  509.  
  510.       TextSy      :  BEGIN
  511.                         Async_Send_String( Script_String );
  512.                         Script_String := '';
  513.                      END;
  514.  
  515.       TimersSy    :  Display_Timers;
  516.  
  517.       TranslateSy :  Set_Translate_Table( Script_String );
  518.  
  519.       ViewSy      :  IF Review_On THEN
  520.  
  521.                         IF Review_Head > 0 THEN
  522.                            Review_Captured_Text
  523.                         ELSE
  524.                            BEGIN
  525.  
  526.                               Save_Screen( Saved_Screen );
  527.  
  528.                               Draw_Menu_Frame( 10, 10, 60, 14, Menu_Frame_Color,
  529.                                                Menu_Text_Color, '' );
  530.  
  531.                               WRITE('Review buffer empty.');
  532.  
  533.                               DELAY( Two_Second_Delay );
  534.  
  535.                               Restore_Screen( Saved_Screen );
  536.  
  537.                               Reset_Global_Colors;
  538.  
  539.                            END
  540.                         ELSE
  541.                      BEGIN
  542.                         Save_Screen( Saved_Screen );
  543.  
  544.                         Draw_Menu_Frame( 10, 10, 60, 14, Menu_Frame_Color,
  545.                                          Menu_Text_Color, '' );
  546.  
  547.                         WRITE('Review buffer not active.');
  548.  
  549.                         DELAY( Two_Second_Delay );
  550.  
  551.                         Restore_Screen( Saved_Screen );
  552.  
  553.                         Reset_Global_Colors;
  554.                      END;
  555.  
  556.       WaitSy      : BEGIN
  557.  
  558.                        TimeW := COPY( Script_String, 1, 8 );
  559.  
  560.                        Save_Screen( Local_Save );
  561.  
  562.                        Draw_Menu_Frame( 10, 10, 60, 14, Menu_Frame_Color,
  563.                                         Menu_Text_Color,
  564.                                         'Wait For Specified Time' );
  565.  
  566.                        WRITELN('Waiting for:  ',TimeW);
  567.                        WRITE  ('Current time: ');
  568.  
  569.                        I         := WhereY;
  570.                        TimeN     := '';
  571.                        ESC_Found := FALSE;
  572.  
  573.                        REPEAT
  574.                           TimeO := TimeN;
  575.                           TimeN := TimeString( TimeOfDay );
  576.                           IF ( TimeN <> TimeO ) THEN
  577.                              BEGIN
  578.                                 GoToXY( 15 , I );
  579.                                 WRITE( TimeN );
  580.                              END;
  581.                           IF KeyPressed THEN
  582.                              BEGIN
  583.                                 READ( Kbd, Ch );
  584.                                 IF ORD( Ch ) = ESC THEN
  585.                                    BEGIN
  586.                                       ESC_Found := TRUE;
  587.                                       IF KeyPressed THEN
  588.                                          READ( Kbd, Ch );
  589.                                    END;
  590.                              END;
  591.                        UNTIL( TimeN = TimeW ) OR ESC_Found;
  592.  
  593.                        Restore_Screen( Local_Save );
  594.  
  595.                        Reset_Global_Colors;
  596.  
  597.                     END;
  598.  
  599.       WhenSy      : BEGIN
  600.                        Script_When_Text       := Script_String;
  601.                        Script_When_Reply_Text := Script_String_2;
  602.                        When_Mode              := LENGTH( Script_When_Text ) > 0;
  603.                     END;
  604.  
  605.       WaitStrSy   : BEGIN
  606.                        Script_Wait_Text       := Script_String;
  607.                        Script_Wait_Reply_Text := Script_String_2;
  608.                        Script_Wait_Time       := Script_Integer_1;
  609.                        IF ( Script_Wait_Time > 0 ) THEN
  610.                           Really_Wait_String := TRUE
  611.                        ELSE
  612.                           BEGIN
  613.                              Really_Wait_String := FALSE;
  614.                              Script_Wait_Time   := -Script_Wait_Time;
  615.                           END;
  616.                        Script_Wait_Failure    := Script_Integer_2;
  617.                        Script_Wait_Start      := TimeOfDay;
  618.                        Script_Wait_Found      := FALSE;
  619.                        WaitString_Mode        := LENGTH( Script_Wait_Text ) > 0;
  620.  
  621.                     END;
  622.  
  623.       ELSE        ;
  624.  
  625.    END (* CASE *);
  626.  
  627. END   (* Execute_Command *);
  628.